<?php
namespace app\baseinfo\controller;

class AgentTypes extends \app\common\controller\Base {
	protected $modelname='AgentType';

	protected function _index(){
		$condition=[];
		$param=$this->param;
    $userInfo=$GLOBALS['userInfo'];
    $sid = $userInfo['site_id'];
    if ($sid) {
      $condition[] = ['site_id', '=', $sid];
    }

		if (isset($param['name']))
		  $condition[]=['name','like',"%".$param['name']."%"];

    if (isset($param['remark']))
      $condition[]=['remark','like',"%".$param['remark']."%"];

		return $condition;
	}
}

?>